section.row-0
  .center-panel
    .col-md-4.col-sm-2.col-xs-1
    .col-md-4.col-sm-8.col-xs-10.text-center
      = render 'shared/notifications'
      = image_tag 'layout/portus-logo-login-page.png', class: 'login-picture'
      = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
        - if APP_CONFIG.enabled?("ldap") || APP_CONFIG.enabled?("oauth.local_login")
          = f.text_field :username, class: 'input form-control input-lg first', placeholder: 'Username', autofocus: true, required: true
          = f.password_field :password, class: 'input form-control input-lg last', placeholder: 'Password', autocomplete: 'off', required: true
          = f.button id: "login-btn", class: 'classbutton btn btn-primary btn-block btn-lg' do
            i.fa.fa-check
            ' Login

        .row
          - if signup_enabled?
            .col-sm-4.create-new-account
              = link_to 'Create a new account', new_user_registration_path, class: 'btn btn-link'
            - if APP_CONFIG.enabled?("anonymous_browsing")
              .col-sm-4.explore
                = link_to "Explore", explore_index_path, id: "explore", class: 'btn btn-link', title: "Explore existing images from this registry"
            .col-sm-4.forgot-password
              = link_to "I forgot my password", new_user_password_path, class: 'btn btn-link'
          - elsif APP_CONFIG.disabled?("ldap")
            - if APP_CONFIG.enabled?("anonymous_browsing")
              .col-sm-6.explore
                = link_to "Explore", explore_index_path, id: "explore", class: 'btn btn-link', title: "Explore existing images from this registry"
            - if APP_CONFIG.enabled?("oauth.local_login")
              .forgot-password
                = link_to "I forgot my password", new_user_password_path, class: 'btn btn-link'
          - elsif APP_CONFIG.enabled?("anonymous_browsing")
            .explore
              = link_to "Explore", explore_index_path, id: "explore", class: 'btn btn-link', title: "Explore existing images from this registry"

        - if show_first_user_alert?
          .alert.alert-info
            strong Note:
            |  The first user to be created will have admin permissions !

        - else
          = social_login
